Skip to content

Conversation

@zephyrbot
Copy link

@zephyrbot zephyrbot commented Feb 4, 2025

Backport f840a35~2..f840a35 from #84955.

Fixes #84952

ycsin added 2 commits February 4, 2025 15:25
The `id` is basically a compile-time constant. Setting it every
time the backend is enabled is unnecessary. Instead, set it on
`z_log_init()` regardless of whether or not it requires to be
`autostart`ed.

Fixes an issue where the `filter_get`/`filter_set`
accessed the wrong index and displayed the wrong log level when
user accesses the status of an uninitialized backend via:
`log backend <uninitialized_backend> status`.

Also fixes an issue when user tries to list the backends via:
`log list_backends`, where all uninitialized backends will have
ID = 0.

Signed-off-by: Yong Cong Sin <[email protected]>
Signed-off-by: Yong Cong Sin <[email protected]>
(cherry picked from commit 8dd9d92)
For backends that do not autostart themselves, initialize
& enable them on `log backend <log_backend_*> go`, so
that they function properly.

Signed-off-by: Yong Cong Sin <[email protected]>
Signed-off-by: Yong Cong Sin <[email protected]>
(cherry picked from commit f840a35)
@zephyrbot zephyrbot added the Backport Backport PR and backport failure issues label Feb 4, 2025
@ycsin ycsin requested a review from nordic-krch February 4, 2025 15:26
@zephyrbot zephyrbot requested a review from dcpleung February 4, 2025 15:26
@ycsin ycsin added the DNM This PR should not be merged (Do Not Merge) label Mar 18, 2025
@ycsin
Copy link
Member

ycsin commented Mar 18, 2025

This PR should combine with #87097 after that PR is merged

@nashif
Copy link
Member

nashif commented Apr 1, 2025

This PR should combine with #87097 after that PR is merged

I am not following what you are asking for.

@kartben
Copy link
Contributor

kartben commented Apr 30, 2025

@ycsin please comment/ revisit

@ycsin
Copy link
Member

ycsin commented Apr 30, 2025

See #89318

@ycsin ycsin closed this Apr 30, 2025
@github-project-automation github-project-automation bot moved this from To do to Done in Backports Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Logging Backport Backport PR and backport failure issues DNM This PR should not be merged (Do Not Merge)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants